NetLogo banner

Home
Download
Help
Forum
Resources
Extensions
FAQ
NetLogo Publications
Contact Us
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

  Donate

NetLogo User Community Models

(back to the NetLogo User Community Models)

[screen shot]

Download
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".(The run link is disabled for this model because it was made in a version prior to NetLogo 6.0, which NetLogo Web requires.)

WHAT IS IT?

This is a replication of Kai Nagel and Michael Schreckenberg's model of traffic flow, as presented in "A cellular automaton model for freeway traffic".

HOW IT WORKS

Initially, patches are occupied by stationary cars with a density determined by the density slider.

The order of actions is as follows:
1) Acceleration: if the velocity v of a vehicle is lower than vmax and if the distance to the next car ahead is larger than v + 1, the speed is advanced by one [v = v + 1].
2) Slowing down (due to other cars): if a vehicle at site i sees the next vehicle at site
i + j (with j < v), it reduces its speed to j I [v = j - 1].
3) Randomization: with probability p, the velocity of each vehicle (if greater than zero)
is decreased by one [v = v - 1].
4) Car motion: each vehicle is advanced v sites.

The patches are arranged linearly, but represent a ring. Cars leaving on the right return on the left.

HOW TO USE IT

Setup occupies a proportion 'density' of patches with a car with an initial velocity of 0.

The plot "Positions" places a point for each site occupied by a car over the last 1,000 ticks. Points are shaded from red to black for stationary and high speed cars, allowing fine structure to be seen in jams with many cars.

"Flow" shows the total flow rate along the road over the last 1,000 ticks given by the mean speed of cars multiplied by the density. The red line shows the time average of the flow.

THINGS TO NOTICE

Try setting p to 0.5, and changing the density over a range of values. What different behavior can you see in the plots?

For a low density such as 0.1, try varying p during the animation. Can you see any sudden changes in the plots?

Try increasing the world width to 500, or 1,000 patches.

Density < 0.1
At low densities, we see generally steady, free-flow. Cars tend to be non-interacting so flow rate increases linearly with increasing density.

Density ~ 0.1
At this density, the "Positions" plot periodically shows regions of high density points corresponding to small traffic jams. These are mirrored in the "Flow" plot by a sudden drop in flow rate. This density shows a mixed-state in the rapid phase transition between free-flow and congested-flow.

Density > 0.1
At high densities, the traffic experiences continuous congestion. Flow rate is low, and decreases with increasing density

Altering p during the animation has a very similar effect to altering the density. Close to the critical density ~0.1, the system is very sensitive. Increasing p from 0 to 0.5 shows gradual decrease in flow rate. Further increase shows a sudden decrease, and phase transition to congested-flow.

The model scales appropriately with world-width. Very long roads help remove the effects of the periodic boundary, and allow us to see very interest fractal structures in the model traffic jams with the "Positions" plot.

CREDITS AND REFERENCES

Kai Nagel and Michael Schreckenberg, "A cellular automaton model for freeway traffic"
Philip Ball - "Critical Mass"

Any suggestions of questions? e-mail: isw3@le.ac.uk

(back to the NetLogo User Community Models)